<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // es5合并对象
        const obj1 = {
            a: 1,
        };
        const obj2 = {
            b: 2,
        };

        // 对象合并
        const obj111 = Object.assign(obj1, obj2);

        // 对象复制
        const obj11 = Object.assign({}, obj1);

        // 对象组合
        const obj3 = Object.assign(obj11, obj2);


    </script>
</body>
</html>